3.376 \(\int \frac{(d+e x^r) (a+b \log (c x^n))}{x^2} \, dx\)

Optimal. Leaf size=67 \[ -\frac{d \left (a+b \log \left (c x^n\right )\right )}{x}-\frac{e x^{r-1} \left (a+b \log \left (c x^n\right )\right )}{1-r}-\frac{b d n}{x}-\frac{b e n x^{r-1}}{(1-r)^2} \]

[Out]

-((b*d*n)/x) - (b*e*n*x^(-1 + r))/(1 - r)^2 - (d*(a + b*Log[c*x^n]))/x - (e*x^(-1 + r)*(a + b*Log[c*x^n]))/(1
- r)

________________________________________________________________________________________

Rubi [A]  time = 0.0766622, antiderivative size = 58, normalized size of antiderivative = 0.87, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {14, 2334, 12} \[ -\left (\frac{d}{x}+\frac{e x^{r-1}}{1-r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{b d n}{x}-\frac{b e n x^{r-1}}{(1-r)^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^r)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((b*d*n)/x) - (b*e*n*x^(-1 + r))/(1 - r)^2 - (d/x + (e*x^(-1 + r))/(1 - r))*(a + b*Log[c*x^n])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin{align*} \int \frac{\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx &=-\left (\frac{d}{x}+\frac{e x^{-1+r}}{1-r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac{-d+d r-e x^r}{(1-r) x^2} \, dx\\ &=-\left (\frac{d}{x}+\frac{e x^{-1+r}}{1-r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{(b n) \int \frac{-d+d r-e x^r}{x^2} \, dx}{1-r}\\ &=-\left (\frac{d}{x}+\frac{e x^{-1+r}}{1-r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{(b n) \int \left (\frac{d (-1+r)}{x^2}-e x^{-2+r}\right ) \, dx}{1-r}\\ &=-\frac{b d n}{x}-\frac{b e n x^{-1+r}}{(1-r)^2}-\left (\frac{d}{x}+\frac{e x^{-1+r}}{1-r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.103402, size = 67, normalized size = 1. \[ -\frac{a (r-1) \left (d (r-1)-e x^r\right )+b (r-1) \log \left (c x^n\right ) \left (d (r-1)-e x^r\right )+b n \left (d (r-1)^2+e x^r\right )}{(r-1)^2 x} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^r)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((a*(-1 + r)*(d*(-1 + r) - e*x^r) + b*n*(d*(-1 + r)^2 + e*x^r) + b*(-1 + r)*(d*(-1 + r) - e*x^r)*Log[c*x^n])/
((-1 + r)^2*x))

________________________________________________________________________________________

Maple [C]  time = 0.152, size = 614, normalized size = 9.2 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^r)*(a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maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n))/x^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.28411, size = 311, normalized size = 4.64 \begin{align*} -\frac{b d n +{\left (b d n + a d\right )} r^{2} + a d - 2 \,{\left (b d n + a d\right )} r +{\left (b e n - a e r + a e -{\left (b e r - b e\right )} \log \left (c\right ) -{\left (b e n r - b e n\right )} \log \left (x\right )\right )} x^{r} +{\left (b d r^{2} - 2 \, b d r + b d\right )} \log \left (c\right ) +{\left (b d n r^{2} - 2 \, b d n r + b d n\right )} \log \left (x\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n))/x^2,x, algorithm="fricas")

[Out]

-(b*d*n + (b*d*n + a*d)*r^2 + a*d - 2*(b*d*n + a*d)*r + (b*e*n - a*e*r + a*e - (b*e*r - b*e)*log(c) - (b*e*n*r
 - b*e*n)*log(x))*x^r + (b*d*r^2 - 2*b*d*r + b*d)*log(c) + (b*d*n*r^2 - 2*b*d*n*r + b*d*n)*log(x))/((r^2 - 2*r
 + 1)*x)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**r)*(a+b*ln(c*x**n))/x**2,x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [B]  time = 1.32393, size = 261, normalized size = 3.9 \begin{align*} \frac{b n r x^{r} e \log \left (x\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} + \frac{b r x^{r} e \log \left (c\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac{b d n \log \left (x\right )}{x} - \frac{b n x^{r} e \log \left (x\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac{b d n}{x} - \frac{b n x^{r} e}{{\left (r^{2} - 2 \, r + 1\right )} x} + \frac{a r x^{r} e}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac{b d \log \left (c\right )}{x} - \frac{b x^{r} e \log \left (c\right )}{{\left (r^{2} - 2 \, r + 1\right )} x} - \frac{a d}{x} - \frac{a x^{r} e}{{\left (r^{2} - 2 \, r + 1\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n))/x^2,x, algorithm="giac")

[Out]

b*n*r*x^r*e*log(x)/((r^2 - 2*r + 1)*x) + b*r*x^r*e*log(c)/((r^2 - 2*r + 1)*x) - b*d*n*log(x)/x - b*n*x^r*e*log
(x)/((r^2 - 2*r + 1)*x) - b*d*n/x - b*n*x^r*e/((r^2 - 2*r + 1)*x) + a*r*x^r*e/((r^2 - 2*r + 1)*x) - b*d*log(c)
/x - b*x^r*e*log(c)/((r^2 - 2*r + 1)*x) - a*d/x - a*x^r*e/((r^2 - 2*r + 1)*x)